package cn.school.course.dao;

import cn.school.course.entity.CourseConflict;
import cn.school.sys.entity.SysConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @className: 课程-冲突Dao
 * @author: fangjin.tao
 * @date: 2023/1/4
 **/
@Mapper
public interface CourseConflictDao extends BaseMapper<CourseConflict> {
	void updateByTeacherConfict(@Param("teacherConflictKey") String teacherConflictKey);
	
	void updateByClassRoomConfict(@Param("classRoomConflictKey") String classRoomConflictKey);
	
	/**
	 * 查询预生成课程，未copy至课程的数据
	 *
	 * @param courConflictEnable
	 * @throws
	 * @author fangjin.tao
	 * @updateTime 2023/1/31 17:30
	 * @return: java.util.List<cn.school.course.entity.CourseConflict>
	 */
	List<CourseConflict> selecByStatusNotGenner(@Param("courConflictEnable") SysConfig courConflictEnable);
	
	/**
	 * 根据两种检测key获取冲突情况的ID列表
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: allTeacherKeyeyList
	 * @param: allRommKeyList
	 * @updateTime 2023/2/8 9:54
	 */
	List<Long> selectIdByKeyList(@Param("allTeacherKeyList") List<String> allTeacherKeyeyList, @Param("allRoomKeyList") List<String> allRommKeyList);
	
	/**
	 * 根据ID列表直接更新为不冲突
	 *
	 * @throws
	 * @author fangjin.tao
	 * @param: idList
	 * @updateTime 2023/2/8 10:51
	 */
	void updateToNotConflict(@Param("idList") List<Long> idList);
	
	
	/**
	 * 根据idList更新已生成正式课程
	 * @author fangjin.tao
	 * @updateTime 2023/2/12 15:39
	 * @throws
	 */
	void updateToStautAlreadyGenner(@Param("idList") List<Long> idList);
}
